export default {
  install: (app) => {
    const options = {
      greetings: {
        hello: "你好",
      },
    };
    app.config.globalProperties.$translate = (key) => {
      return key.split(".").reduce((o, i) => {
        if (o) return o[i];
      }, options);
    };
    app.provide("i18n", options);
  },
};
